libmystdio.so:my_stdio.o my_string.o
	gcc -o $@ $^ -shared
%.o:%.c
	gcc -fPIC -c $<
.PHONY:clean
clean:
	rm -rf *.so *.o *.tar stdc

.PHONY:output
output:
	mkdir -p stdc/include
	mkdir -p stdc/lib 
	cp *.h stdc/include
	cp *.so stdc/lib 
	tar -czf stdc.tgz stdc































#libmystdio.a:my_stdio.o my_string.o
#	@ar -cr $@ $^
#	@echo "build $^ to $@ ...done"
#%.o:%.c
#	gcc -c $< 
#.PHONY:clean
#clean:
#	rm -rf *.a *.o stdc
#.PHONY:output
#output:
#	mkdir -p stdc/include
#	mkdir -p stdc/lib 
#	cp *.h stdc/include
#	cp *.a stdc/lib 
#	tar -czf stdc.tgz stdc
